using MicroMsg.Common.Event;
using System;
using System.Collections.Generic;
namespace MicroMsg.Storage
{
	public class ChatRoomStorage : StorageTable<ChatRoom, string>
	{
		public ChatRoomStorage() : base((ChatRoom cr) => cr.strChatRoomName)
		{
		}
		public ChatRoom method_7(string chatRoomName)
		{
			if (string.IsNullOrEmpty(chatRoomName))
			{
				return null;
			}
			return base.method_2((ChatRoom c) => c.strChatRoomName == chatRoomName);
		}
		public bool method_8(string chatRoomName)
		{
			ChatRoom chatRoom = this.method_7(chatRoomName);
			return chatRoom != null && base.method_4(chatRoom);
		}
		public bool method_9(List<string> chatRoomNameList)
		{
			return base.method_6((ChatRoom c) => chatRoomNameList.Contains(c.strChatRoomName));
		}
		public bool updateList(List<ChatRoom> roomList)
		{
			return base.updateList<string>(roomList, (ChatRoom r) => r.strChatRoomName);
		}
		public override void notify(int operation, ChatRoom item)
		{
			EventCenter.postCombineEvent(EventConst.ON_STORAGE_CHATROOM_ADD + operation, item);
		}
	}
}
